package com.zijie.shoprbacapi.mapper;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zijie.rbac.model.Resource;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface ResourceMapper extends BaseMapper<Resource> {
    default Page<Resource> findAll(Page<Resource> page, Resource resource) {
        LambdaQueryWrapper<Resource> wrapper = Wrappers.lambdaQuery(resource);
        return selectPage(page, wrapper);
    }

}